import request from '@/utils/request'

export default{
    getSysUserPageList(pageNum,pageSize,searchObj) {
        return request({
          url: `/system/user/getSysUserPageList/${pageNum}/${pageSize}`,
          method: 'post',
          data: searchObj
        })
    },
    saveUser(user){
        return request({
            url: `/system/user/insert`,
            method: 'post',
            data: user
          })
    },
    getUserById(id){
        return request({
            url: `/system/user/getUserById/${id}`,
            method: 'get',
          })
    },
    updateUser(user){
        return request({
            url: `/system/user/updateUser`,
            method: 'post',
            data:user
          })
    },
    removeUserId(id){
        return request({
            url: `/system/user/removeUserById/${id}`,
            method: 'delete',
          })

    },
    batchRemove(idList) {
        return request({
          url: `/system/user/removeBatch`,
          method: `delete`,
          data: idList
        })
    },

    updateUserStatus(userId,status){
      return request({
          url: `/system/user/updateUserStatus/${userId}/${status}`,
          method: 'get',
        })
    },
    toAssign(userId){
      return request({
          url: `/system/user/toAssign/${userId}`,
          method: 'get',
        })
    },
    doAssign(assginRoleDTO){
      return request({
        url: `/system/user/doAssign`,
        method: 'post',
        data: assginRoleDTO
      })
    },
}
